<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <title>商品列表</title>
    <style>
        .list {
            list-style: none;
            display: flex;
            width: 1200px;
            padding: 20px;
            flex-wrap: wrap;
            margin: 20px auto;
        }

        .list li {
            width: 240px;
            margin: 20px;
            border-radius: 10px;
            box-shadow: 0 0 4px orange;
            height: 300px;
            padding: 10px;
        }

        a {}

        img {
            width: 100%;
            height: 200px;
        }
    </style>
</head>

<body>
    <div>
        <%- include("head", {name:'商品列表'}) %>
    </div>
    <div>
        <ul class="list">
            <% result.map((item,index)=>{ %>
                <li>
                    <a href="/detail?goodid=<%- item._id%> ">
                        <img src="<%- item.img%>" alt="">
                        <p>
                            <%-item.name %> / <%- item.price %>
                        </p>
                    </a>
                </li>
                <% }) %>
        </ul>
    </div>
    <%- include foot %>
</body>

</html>